<template>
  <div class="m_left" v-if="loginStatus">
    <div class="left_n">管理中心</div>
    <div class="left_m">
      <div class="left_m_t t_bg1">订单中心</div>
      <ul>
        <li>
          <router-link to="/back-index/back-orders">我的订单</router-link>
        </li>
        <li>
          <router-link to="/back-index/show-address">收货地址</router-link>
        </li>
      </ul>
    </div>
    <div class="left_m">
      <div class="left_m_t t_bg2">会员中心</div>
      <ul>
        <li>
          <router-link to="/back-index/show-user">用户信息</router-link>
        </li>
        <li><router-link to="/back-index/back-collects">我的收藏</router-link></li>
      </ul>
    </div>
    <div class="left_m" v-if="userRole == 1">
      <div class="left_m_t t_bg3">商品管理</div>
      <ul>
        <li>
          <router-link to="/back-index/show-category">分类管理</router-link>
        </li>
        <li>
          <router-link to="/back-index/back-products">商品管理</router-link>
        </li>
      </ul>
    </div>
    <div class="left_m">
      <div class="left_m_t t_bg4">首页咨讯</div>
      <ul>
        <li>
          <router-link to="/back-index/back-news">{{userRole == 1 ?'资讯管理':'查看资讯'}}</router-link>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
    name:'BackAside',
    computed:{
        loginStatus(){
            return this.$store.state.loginStatus;
        },
        userRole(){
            return this.$store.state.userRole;
        }
    }
}
</script>

<style>
</style>